/***
 * 时间控制器
 */
export default class TimeClock {
    viewer: any;
    options: any; // 或者更具体的类型
    constructor(viewer: any, options: any) {
        this.viewer = viewer;
        this.options = options;
        this.init();
    }
    init() {
        this.viewer.scene.globe.enableLighting = true;
    }
    setTime(time = '2024-09-01 08:00:00') {
        const date = new Date(time);
        // 转为世界时
        const JulianDate = Cesium.JulianDate.fromDate(date);
        // 比北京时间晚8小时，北京时间=JulianDate+8
        this.viewer.clock.currentTime = Cesium.JulianDate.addHours(JulianDate, 8, new Cesium.JulianDate());
    }
    /**
     * 允许阴影
     */
    enableShadow() {
        this.viewer.scene.shadows = true;
    }
}
